package com.kefu.admin.config;

import com.kefu.admin.common.globals.ApplicationConstant;
import com.kefu.admin.common.zk.zkleader.ApplicationContextHolder;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.ComponentScan;


@MapperScan( basePackages = {"com.kefu.admin.modules.**.mapper","tk.mybatis.spring.annotation.MapperScan"})
@ComponentScan({"com.kefu.admin.modules.**.service", "com.kefu.admin.modules.**.controller",  "com.kefu.admin.**.common"})
public class BaseConfiguration {
    public BaseConfiguration() {
    }


    @Bean
    public ApplicationContextHolder applicationContextHolder(ApplicationConstant applicationConstant) {
        ApplicationContextHolder applicationContextHolder = ApplicationContextHolder.getInstance();
        applicationContextHolder.init(applicationConstant);
        return applicationContextHolder;
    }
}
